Unless otherwise indicated herein, the materials described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
There are many software development tools to help a software developer produce source code. One standard tool is an integrated development environment (IDE), which provides the developer with a source code editing environment and additional supporting software development tools. Typically, the IDE includes file management tools for loading and saving source code, an editor for writing new source code and editing existing source code, tools for compiling source code, tools for tracing the operation of the source code, tools for selecting pre-defined and previously defined programming objects used in the source code, etc. An “on-line” help function may also be provided. The on-line help functionality may be invoked upon occurrence of a predetermined event, such as a developer positioning a cursor over an identifier followed by a clicking of a mouse button, hovering the mouse cursor over an identifier, selecting a menu or icon after highlighting the identifier, or the partial entry of an identifier into the source code via an input device such as a keyboard.
As programs have become more complex, and the size of source code-bases underlying a program have expanded in size, this on-line help function has become an important tool for increasing programming productivity and reducing error rates. Modern computer programs typically consist of many different source code files and use one or more programming libraries. These programming libraries may include source and/or object code stored in system libraries, networking libraries, and utility libraries comprising many different classes and functions (e.g., methods in object-oriented programming languages, such as C++).
In addition, modern object oriented languages have implemented a number of concepts, such as function overloading and inheritance, that further complicate matters. Function overloading occurs when multiple functions within a class hierarchy share the same name or identifier, but have differing numbers of parameters or differing parameter types. Inheritance allows a parent class to predefine one or more functions for use, and possible modification, in a child class. Because of the proliferation of libraries and classes, and the introduction of concepts such as function overloading and inheritance, the number of functions available to a software developer has risen quickly. This makes it difficult if not impossible for a software developer to remember the calling sequence for any one particular function and/or the instantiation requirements for any one particular class, and also makes it very difficult for a developer to efficiently propagate changes to function names, calling sequences, etc. throughout a large code base, among other problems.
In addition to method and class definitions, software modules will typically define a large number of other identifiers. These additional identifiers may include type definitions (typedefs), variables, macros, parameters, declarators, type qualifiers, keywords, packages, interfaces, expressions, namespaces, templates, objects, labels, operators, file paths, attributes, statements, annotations, literal constants, etc., and each identifier itself may have an associated type, declaration, and/or definition. Particularly in large software projects, it is thus often difficult for a developer to remember the name of the identifier and/or the type, declaration, or definition associated with the identifier. In addition, this information may be context dependent, and may vary based on the current scope of the code being reviewed in the IDE and the scope of the desired identifier. Similar to changes in function calling names and sequences, it is difficult for a developer to consistently and efficiently propagate changes to identifiers throughout a large code base.
On-line help functionality is provided, in part, to reduce the burden on the developer in remembering function names, calling sequences, identifiers, and other programming language identifiers, and to improve correctness of the resulting source code. For example, when a developer begins typing a first four letters of a name of a function, the on-line help functionality may access one or more stored indexes and determine what function names start with the first four letters already been typed by the developer. The on-line help functionality may then display one or more matched functions and reference information regarding the matched function(s). For example, the reference information may include comments associated with each function explaining its purpose and behavior, or may include a parameter list setting forth calling parameters required for each function. Once the particular function desired by the developer has been entered, the on-line help functionality may prompt the developer to enter a value for each calling parameter of the selected function and may display associated data types for each calling parameter, to assist the developer in completing the function call. In the event that the matched function is overloaded, the on-line help functionality may prune a list of matching overloaded functions as the developer adds calling parameters that are incompatible with particular overloaded functions. The on-line help functionality may provide other functions as well, such as a refactoring function, which a developer may use to modify the structure of a program without changing its functionality to improve, for example, readability or performance.